#coding=utf-8
'''
Created on 2016.3.14

@author: wangpeng
'''
import urllib
import httplib
import json
import os
import os.path
import urlparse
import time
import random
import logging
import re
now = time.strftime('%Y-%m-%M-%H_%S',time.localtime(time.time()))
logging.basicConfig(level=logging.INFO,
                format='%(asctime)s %(filename)s %(levelname)s %(message)s',
                datefmt='%y%m%d_%H:%M:%S',
                filename= 'E:\\eclipse\\huawei_rader\\all_mobile\\report\\huawei_honor6\\huawei_honor6_output_log.txt',
                #filename= 'test_log.txt',
                filemode='a+')
#################################################################################################
#定义一个StreamHandler，将INFO级别或更高的日志信息打印到标准错误，并将其添加到当前的日志处理对象#
console = logging.StreamHandler()
console.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s %(message)s')
console.setFormatter(formatter)
logging.getLogger('').addHandler(console)